﻿CREATE FUNCTION [dbo].[ETL_Func_GetMappedDtSourceCount]
(
	@dtSerId uniqueidentifier
)
RETURNS INT
AS
BEGIN
	return (select COUNT(Id) from ETL_DtSource where DtSerId=@dtSerId and Id in
(select DSM.DtSourceId from ETL_DtSourceMapping as DSM where DSM.DtSerId=@dtSerId))
END
